home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 21 / Mac Magazin and MacEasy Magazine CD - Issue 21.iso / Wissenschaft & Technik / yorick12vr1-nofpu folder / startup / paths.i < prev    next >
Text File  |  1995-07-26  |  6KB  |  130 lines

  1. /*
  2.    PATHS.I
  3.  
  4.    $Id: paths.i,v 1.1 1993/08/27 18:32:09 munro Exp $
  5.  
  6.    When Yorick starts, it must be able to find several standard include
  7.    files which initialize the interpreter.  The default paths to these
  8.    files are established when Yorick is compiled (see the Maketmpl and
  9.    Makefile files in the Yorick distribution).  However, if the Yorick
  10.    binary is moved to a new site, the absolute path names of these
  11.    required startup files may change.  By editing this file and placing it
  12.    in the same directory as the Yorick executable file, you can adjust for
  13.    such path name changes, which makes it possible to port Yorick binaries.
  14.  
  15.    Yorick "knows" two crucial paths when it starts:
  16.  
  17.       Y_LAUNCH     the directory containing the executable file
  18.                    which is now running.  This may be Yorick itself,
  19.            or a custom version of Yorick.  On UNIX systems,
  20.            Yorick will not be fooled by an "executable"
  21.            which is a soft link to a file in another
  22.            directory; the directory containing the actual
  23.            executable file will be found.
  24.  
  25.       Y_SITE       the directory containing the standard startup
  26.                    files Yorick needs to be able to find.  The name
  27.            of this directory is compiled into Yorick (see
  28.            comments in Makefile, Maketmpl, and codger.c).
  29.  
  30.    The Y_SITE directory may not be correct, if this program is not
  31.    at the site where it was compiled.  At startup, Yorick's (temporary)
  32.    search path for include files is:
  33.  
  34.       Y_LAUNCH : Y_SITE : Y_SITE/contrib
  35.  
  36.    This file, paths.i, is the first file included.  Ordinarily, paths.i
  37.    will be in Y_SITE, but if it is not (because the Y_SITE directory does
  38.    not exist or is not writable by the proprietor of Yorick at this site),
  39.    paths.i may alter the initial search path by calling the interpreted
  40.    function set_site, which sets the interpreted variables Y_LAUNCH and
  41.    Y_SITE, as well as setting the startup search path.
  42.  
  43.    These same considerations apply when porting the binary executable
  44.    for any Yorick-based code -- the portion of Y_SITE required for startup
  45.    must also be moved to the new site, and either placed directly in
  46.    Y_LAUNCH, or an appropriate paths.i placed in Y_LAUNCH.
  47.  
  48.    A related consideration for custom versions of Yorick is the stdx.i
  49.    file.  Just as paths.i is the first file to be included when Yorick
  50.    starts, stdx.i is the last file which must be included for Yorick to
  51.    start properly.  It resets the search path for include files to its
  52.    "final" value, which is by default:
  53.  
  54.       . : ~/Yorick : Y_LAUNCH/include : Y_SITE/include : Y_SITE/contrib
  55.  
  56.    If a custom version overrides this default by placing a stdx.i in
  57.    Y_LAUNCH, then that special stdx.i might need revision when that
  58.    custom version of Yorick is moved to a new site.  I believe there is
  59.    no reason that a custom Yorick should ever need a special stdx.i.
  60.  
  61.    ----------------------------------------------------------------------
  62.  
  63.    The Gist style sheets, palettes, and PostScript template must lie
  64.    in a place known to the Gist library routines in order for Yorick's
  65.    graphics functions to work.  If the Gist library was compiled with
  66.    an incorrect value of GISTPATH, set the variable GISTPATH to the
  67.    correct value below.
  68.  
  69.    The hcp_out command invokes the gist CGM browser and pipes its
  70.    PostScript output into lpr.  If the binaries have been ported, gist's
  71.    compiled-in GISTPATH may not be correct.  Furthermore, gist itself may
  72.    not be on the user's execution path.  You may be able to remedy these
  73.    defects by setting the variable GIST_FORMAT here.  The variable
  74.    LPR_FORMAT provides a similar service for PostScript files generated
  75.    directly by Yorick.
  76.  */
  77. /*    Copyright (c) 1994.  The Regents of the University of California.
  78.                     All rights reserved.  */
  79.  
  80. /* ------------------------------------------------------------------------ */
  81.  
  82. extern Y_SITE, Y_LAUNCH;
  83. /* DOCUMENT Y_LAUNCH       the directory containing the Yorick executable
  84.             Y_SITE         Yorick's "site directory"
  85.      Y_LAUNCH is set by compiled code when Yorick starts and should never
  86.               be modified.
  87.      Y_SITE is set to a default built-in value by compiled code at startup,
  88.               but may be modified in the file Y_LAUNCH/paths.i to allow for
  89.           ports of Yorick binary executables.
  90.  */
  91.  
  92. /* set_site, "YORICK_SITE_DIR"; */
  93.  
  94. /* ------------------------------------------------------------------------ */
  95.  
  96. /* The first component of the GISTPATH should always be ~/Gist
  97.    -- you need this line only if the value compiled into the Gist library
  98.       libgist.a is incorrect.  */
  99. /* GISTPATH= "~/Gist:"+"GIST_SITE_DIR"; */
  100.  
  101. extern GIST_FORMAT, LPR_FORMAT;
  102. /* DOCUMENT GIST_FORMAT
  103.      is used by the hcp_out function to generate the system call which
  104.      invokes the gist CGM browser and pipes its output to lpr.  This
  105.      format should contain a single %s specification; after this %s is
  106.      replaced by the name of the CGM file, Yorick invokes the system
  107.      command on the resulting string.
  108.  
  109.      LPR_FORMAT is also used by hcp_out to process PostScript files
  110.      made directly by Yorick.
  111.  
  112.      The default values are:
  113.  
  114.         GIST_FORMAT= "gist %s -f | lpr";
  115.     LPR_FORMAT= "lpr %s";
  116.  
  117.    SEE ALSO: hcp_out
  118.  */
  119.  
  120. GIST_FORMAT= /*GIST_HOME_DIR*/ "gist %s -f | lpr";
  121. LPR_FORMAT= "lpr %s";
  122.  
  123. /* Here is how to remedy (1) gist not being on the user's execution path
  124.    and (2) gist being compiled at a different site with the wrong
  125.    compiled-in GISTPATH:
  126. GIST_FORMAT= "env GISTPATH=/env/Gist /usr/local/Gist/gist/gist %s -f | lpr";
  127.  */
  128.  
  129. /* ------------------------------------------------------------------------ */
  130.